package cn.heycm.blog.common.sms.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serial;
import java.io.Serializable;
import java.util.Map;

/**
 * 短信响应
 *
 * @author hey
 * @version 1.0
 * @since 2024/9/17 16:31
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class SmsResponse implements Serializable {

    @Serial
    private static final long serialVersionUID = 7094943420754539443L;

    /**
     * 状态码: 0:成功
     */
    private String code;

    /**
     * 状态信息
     */
    private String message;

    /**
     * 响应数据
     */
    private Map<String, Object> data;

    public boolean isOk() {
        return "0".equals(code);
    }

}
